var index=0; $(function(){ var t='first'; $('.' + t).find('.tab_menu li').removeClass("active"); $('.' + t).find('.tab_menu li:' + t + '-child').addClass("active"); $('.' + t).find('.tab_container .tabcontent').hide(); $('.' + t).find('.tab_container .tabcontent:' + t + '-child').fadeIn("fast"); var t='last'; $('.' + t).find('.tab_menu li').removeClass("active"); $('.' + t).find('.tab_menu li:' + t + '-child').addClass("active"); $('.' + t).find('.tab_container .tabcontent').hide(); $('.' + t).find('.tab_container .tabcontent:' + t + '-child').fadeIn("fast"); var t=$('.auto.tab .tab_container .tabcontent'); var interval=$('.auto .tab_menu').attr("interval"); var tabs=$('.auto.tab .tab_menu li'); setInterval(function(){ tabs.removeClass("active"); tabs.eq(index).addClass("active"); var con_id=tabs.eq(index).find("a").attr("data-rel"); t.hide(); $('#' + con_id).fadeIn("fast"); index++; if(index >=tabs.length){ index=0; }}, interval); }); $(".tab .tab_menu li a").click(function(){ var tabs=$('.auto.tab .tab_menu li'); index=$(this).parent().index()+1; var l=tabs.length; if(parseInt(index) >=l){ index=0; }else{ index=$(this).parent().index() + 1; } var id=$(this).attr("data-rel"); $(this).parent().parent().find("li").removeClass("active"); $(this).parent().addClass("active"); $(this).parent().parent().parent().find('.tabcontent').hide(); $(this).parent().parent().parent().find('#'+id).fadeIn("fast"); }); $(document).ready(function(){ $('.resbasketIcon').click(function (e){ $(this).parent().find('.basket_o_wrapper').slideToggle(200); }); $('.resSearchIcon').click(function (e){ $(this).parent().find('.resSearchResult').slideToggle(200); }); if($('.content-slider').length){ $(".content-slider").lightSlider({ loop: true, auto: false, item: 3, pause: 6000, speed: 400, //ms' controls: true, prevHtml: '', nextHtml: '', keyPress: true, responsive: [ { breakpoint: 1023, settings: { item: 3, slideMove: 1, slideMargin: 6, }}, { breakpoint: 767, settings: { item: 2, slideMove: 1, slideMargin: 6, }}, { breakpoint: 479, settings: { item: 1, slideMove: 1 }} ] }); } $(".slide_button .prev").click(function(){ $(this).parent().parent().find(".lSPrev").trigger('click'); }); $(".slide_button .next").click(function(){ $(this).parent().parent().find(".lSNext").trigger('click'); }); $(window).scroll(function (){ if($(this).scrollTop() > 100){ $('.scrollup').fadeIn(); }else{ $('.scrollup').fadeOut(); }}); $('.scrollup').click(function (){ $("html, body").animate({ scrollTop: 0 }, 600); return false; }); if($('a[rel*=prettyPhoto]').length){ $(".gallery a[rel^='prettyPhoto']").prettyPhoto({ iframe_markup: '', social_tools:'', animation_speed:'normal', theme:'light_square', slideshow:3000, autoplay_slideshow: false}); }; if($('dt.gallery-icon').length){ $(".gallery-icon a").prettyPhoto({ iframe_markup: '', social_tools:'', animation_speed:'normal', theme:'light_square', slideshow:3000, autoplay_slideshow: false}); }}); window.onload=setTimeout(function(){ $('.wc_print_notices').fadeOut(1000) }, 10000); function toggle_nav(){ document.getElementsByClassName("multiple_menu")[0].classList.toggle("responsive"); } $(".color_box .close").click(function(){ $(this).parent().slideUp('fast'); }); var handler; $("#menu-icon2").click(function(){ $("div.inner_body_wrapper").toggleClass(function(){ if(handler==true){ handler=false; $(".inner_body_wrapper").animate({right: 0}, 270); return ""; }else{ handler=true; $(".inner_body_wrapper").animate({right: 270}, 300); return "moved"; }}); }); $(".resnavButt").click(function(){ $(".woocommerce-MyAccount-navigation").toggleClass('open') }); $('.inner_body_wrapper li .icon').click(function(){ $(this).toggleClass('clicked') $(this).next().slideToggle('fast'); if($(this).hasClass('clicked')){ $(this).text(''); }else{ $(this).text(''); }}); $('.wc_print_notices .close').click(function(){ $(this).parent().parent().fadeOut(1000); });